﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace DigDes.DS2012.BaseLoader
{
    public abstract class Loader
    {
        protected internal int getYear(string FileName)
        {
            var year = 0;

            if (!Int32.TryParse(FileName.Substring(9, 4), out year))
                return DateTime.Today.Year;

            if (year < DateTime.MinValue.Year || year > DateTime.MaxValue.Year)
                return DateTime.Today.Year;

            return year;
        }
    }
}
